package router

import (
	"content_system/handler"
	"github.com/gin-gonic/gin"
)

func RegisterUserRouter(r *gin.Engine) {
	userHandler := handler.GetUserHandler()
	userPerm := r.Group(rootPath + "/user").Use(authMiddleware.Auth)
	{
		userPerm.GET("/info", userHandler.Info)
	}

	noUserPerm := r.Group(rootPath + "/user")
	{
		noUserPerm.POST("/register", userHandler.Register)
		noUserPerm.POST("/login", userHandler.Login)
	}
}
